﻿#include "ProtectionIcon.h"

ProtectionIcon::ProtectionIcon(const QPoint& o, const qint32 r, const int time, const int Hz)
	:DrawMulticoloredCircle(o,r,time)
{
	setHz(Hz);

	m_TextPos = getO()-QPoint(10,-10);
	m_NumFont.setPixelSize(35);
}

void ProtectionIcon::draw(QPainter* painter)
{
	DrawMulticoloredCircle::draw(painter);
	painter->setPen(m_NumPen);
	painter->setFont(m_NumFont);

	QString Num = QString::number(m_time);
	/*Num = "X" + Num;*/
	painter->drawText(m_TextPos, Num);
}

void ProtectionIcon::setTime(int time)
{
	m_time = time;
}
